package cn.com.flat.web.page;

import java.util.List;

/**
 * 标题: 分页构造器
 * <p>
 * 描述: 分页构造器
 * <p>
 * 版权：Copyright (c) 2016
 * <p>
 *
 * @author 张顺
 * @version 1.0
 * @created 2016/11/09/22:27
 */
public class Page<T> {
    private List<T> data;
    private int totalNumber;//总条数
    private int currentPage;//当前页位置
    private int pageSize=10;//一页显示多少条数据,默认10
    private int startIndex;//分页起始位置
    private int totalSelect;//查询总数据

    public Page(){

    }

    public Page(List<T> data, int totalNumber, int currentPage, int pageSize, int startIndex, int totalSelect) {
        this.data = data;
        this.totalNumber = totalNumber;
        this.currentPage = currentPage;
        this.pageSize = pageSize;
        this.startIndex = startIndex;
        this.totalSelect = totalSelect;
    }

    public List<T> getData() {
        return data;
    }

    public void setData(List<T> data) {
        this.data = data;
    }

    public int getTotalNumber() {
        return totalNumber;
    }

    public void setTotalNumber(int totalNumber) {
        this.totalNumber = totalNumber;
    }

    public int getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(int currentPage) {
        this.currentPage = currentPage;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getStartIndex() {
        return startIndex;
    }

    public void setStartIndex(int startIndex) {
        this.startIndex = startIndex;
    }

    public int getTotalSelect() {
        return totalSelect;
    }

    public void setTotalSelect(int totalSelect) {
        this.totalSelect = totalSelect;
    }
}
